package Array;

import java.util.Arrays;

/**
 * Enjoy programming!!!
 * 时间： 2021/10/24 -  20:55
 */
public class Array03 {
    public static void main(String[] args) {

        int[] n = {1, 3, 5, 7, 9, 11};
        int[] array;
        array = n;
//        for (int element : array) {
//            System.out.println(element);
//        }
//        for (int i = 0; i < array.length; i++) {
//            System.out.println(array[i]);
//        }

        int[] luckNumbers = array;
        luckNumbers[5] = 12;
        System.out.println(array[5]);

        int[] luck = Arrays.copyOf(array, array.length);
        for (int element : luck) {
            System.out.println(element);
        }
    }
}
